﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SecurityEval.ascx.cs" Inherits="SecurityEval" %>
<table><tr><td>
<asp:DropDownList ID="DropDownList_dpt" runat="server" AutoPostBack="True" DataSourceID="ObjectDataSource_Dpt"
    DataTextField="Name" DataValueField="Id" OnDataBound="DropDownList_dpt_DataBound"
    OnSelectedIndexChanged="DropDownList_dpt_SelectedIndexChanged">
</asp:DropDownList><br />
<asp:ObjectDataSource ID="ObjectDataSource_Dpt" runat="server" SelectMethod="GetDepartments"
    TypeName="DepartmentDb"></asp:ObjectDataSource>
<br />
</td></tr>
<tr><td>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
    DataSourceID="ObjectDataSource_staff" 
    onrowdatabound="GridView1_RowDataBound">
    <Columns>
        <asp:BoundField DataField="SerialNum" HeaderText="考核编号" ReadOnly="True" />
        <asp:BoundField DataField="Name" HeaderText="姓名" ReadOnly="True" />
        <asp:TemplateField HeaderText="部门">
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# GetDptNameById(Eval("DepartmentNum")) %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="Title" HeaderText="职务" ReadOnly="True" />
        <asp:BoundField DataField="Withdraw" HeaderText="扣款" />
        <asp:BoundField HeaderText="扣款原因" DataField="WdReason" />
        <asp:CommandField ShowEditButton="True" />
    </Columns>
</asp:GridView>
<br />
<asp:ObjectDataSource ID="ObjectDataSource_staff" runat="server" SelectMethod="GetStaffs"
    TypeName="StaffDB" DataObjectTypeName="StaffDetail" UpdateMethod="UpdateWithdraw">
    <SelectParameters>
        <asp:Parameter DefaultValue="0" Name="DepartmentNum" />
    </SelectParameters>
</asp:ObjectDataSource>
</td></tr></table>
